<%--
  Created by IntelliJ IDEA.
  User: mengweiqiang
  Date: 2017/4/28
  Time: 22:00
  Function: Change Personal Information Page
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8"%>
<html >
<head>
    <title>修改个人信息</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="../plugins/bootstrap/css/bootstrap.min.css">
    <script src="../plugins/jquery/jquery-3.2.1.min.js"></script>
    <script src="../plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="../scripts/CheckChangePersonInfo.js"></script>
</head>
<body style="background-color:#eeeeee">
<div class="container">
    <div class="row">
        <h2 style="font-family: '黑体';margin-top:2%;margin-bottom: 2%;color: #2aabd2;text-align: center">用户个人信息修改</h2>
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="text-align: center">
            <form role="form"  method="POST" style="background-color:rgba(255,255,255,0.8);border: 1px solid #dedede;border-radius:8px;margin:0 auto;padding:30px;margin-bottom:30px;max-width: 500px" action="/user/ChangePersonInfo?UserID=${user.userID}" onsubmit="return CheckPersonalInfo()">
                <div class="form-group" style="text-align: left;">
                    <div class="form-inline">
                        <label for="UserID" class="control-label text-muted">&nbsp;&nbsp;&nbsp;&nbsp;用户ID：</label>
                        <label  class="control-label" id="UserID">${user.userID}</label>
                    </div>
                </div>

                <hr>
                <div class="form-group" style="text-align: left;margin-left: 10px">
                    <label class="text-danger ">*表示必填项</label>
                </div>
                <div class="form-group" style="text-align: left;">
                    <div class="form-inline">
                        <label for="UserName1" class="control-label">&nbsp;&nbsp;&nbsp;&nbsp;用户名：</label>
                        <input type="text" class="form-control " id="UserName1" name="UserName" style="width: 80%" value=${user.userName}>
                        <label class="text-danger " >*</label>
                    </div>
                </div>

                <div class="form-group" style="text-align: left;">
                    <div class="form-inline">
                        <label for="Name" class="control-label">&nbsp;&nbsp;&nbsp;&nbsp;姓&nbsp;名&nbsp;&nbsp;：</label>
                        <input type="text" class="form-control" id="Name" name=Name  style="width: 80%" value=${user.name}>
                        <label class="text-danger " >*</label>
                    </div>
                </div>

                <div class="form-group" style="text-align: left;">
                    <div class="form-inline">
                        <label  class="control-label">&nbsp;&nbsp;&nbsp;&nbsp;性&nbsp;别&nbsp;&nbsp;：&nbsp;&nbsp;&nbsp;</label>
                        <label class="radio-inline"><input type="radio" id="Gender1" name="Gender" value="1">男</label>
                        <label class="radio-inline"><input type="radio" id="Gender2" name="Gender" value="2">女</label>
                    </div>
                </div>

                <div class="form-group" style="text-align: left;">
                    <div class="form-inline">
                        <label  class="control-label">出生日期：</label>
                        <input type="date"  class=" form-control" style="width: 80%;" id="DateOfBirth" name="DateOfBirth" value=${user.dateOfBirth}>
                        <label class="text-danger " >*</label>
                    </div>
                </div>

                <div class="form-group" style="text-align: left;">
                    <div class="form-inline">
                        <label  class="control-label">移动电话：</label>
                        <input type="text"  class=" form-control" style="width: 80%;" id="TelPhone" name="TelPhone" value=${user.telPhone}>
                        <label class="text-danger " >*</label>
                    </div>
                </div>

                <div class="form-group" style="text-align: left;">
                    <div class="form-inline">
                        <label  class="control-label">电子邮箱：</label>
                        <input type="email"  class=" form-control" style="width: 80%;" id="Email" name="Email" value=${user.email}>
                        <label class="text-danger " >*</label>
                    </div>
                </div>

                <div class="form-group" style="text-align: left;">
                    <div class="form-inline">
                        <label  class="control-label">单位名称：</label>
                        <input type="text"  class=" form-control" style="width: 80%;" id="Company" name="Company" value=${user.company}>
                        <label class="text-danger " >*</label>
                    </div>
                </div>
                <hr>
                <div class="form-group" style="text-align: right;margin-right: 13px">
                    <div class="form-inline">
                        <button type="submit" class="btn btn-primary" >确认修改</button>
                        <button type="button" class="btn btn-default"  onclick="window.history.back()">关闭</button>
                    </div>
                </div>
            </form>


        </div>
    </div>

</div>
<script>
   $(document).ready(function() {
        if('${user.gender}'=="1")
        {
            $("#Gender1").attr("checked","checked");
        }
        else
        {
            $("#Gender2").attr("checked","checked");
        }
    });
</script>
</body>
</html>
